package xin.nick.demo;

import lombok.extern.log4j.Log4j2;
import org.slf4j.MDC;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;


@Log4j2
@RestController
public class Demo3Controller {

    @GetMapping("/logDemo3")
    public String login() {
        String requestId = MDC.get("requestId");
        log.info("用户登录成功");
        getUserInfo();
        return new StringBuilder("登录OK,requestId:").append(requestId).toString();
    }

    public void getUserInfo() {
        log.info("用户开始获取信息");
        getCoupns();
    }
    public void getCoupns() {
        log.info("用户获取优惠券信息");
    }


}
